#ifndef __HEAD__
#define __HEAD__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <time.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <pwd.h>
#include <grp.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/select.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <signal.h>
#include <pthread.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/epoll.h>
#include <sys/sendfile.h>
#include <mysql/mysql.h>
#include <crypt.h>
#include <shadow.h>
#include <openssl/sha.h>
#include <openssl/evp.h>
#define THREAD_ERROR_CHECK(ret, msg)\
    if(ret != 0){\
        fprintf(stderr,"%s:%s\n", msg, strerror(ret));\
        exit(1);\
    }\

#define ARGS_CHECK(argc, expected)\
    do{\
    	if((argc) != (expected)){\
	    fprintf(stderr,"args num error!\n");\
	    exit(1);\
	}\
    }while(0);\

#define ERROR_CHECK(ret, error_flag, msg)\
    do{\
        if((ret) == (error_flag)){\
	    perror(msg);\
	    exit(1);\
	}\
    }while(0);\

#endif

